#ifndef RAW_VOL_GRID_H
#define RAW_VOL_GRID_H

class RawVolGrid
{
	unsigned char * m_pData;
	unsigned int m_dataX, m_dataY, m_dataZ;
	size_t m_voxelSize;
public:
	RawVolGrid(void);
	~RawVolGrid(void);

	inline const unsigned char * GetAt(int i, int j, int k) const
	{
		if(!m_pData)
		{
			return (unsigned char)0;
		}
		return &(m_pData[m_voxelSize*(i +m_dataX*(j + m_dataY*k))]);
	}

	inline int GetSizeX() const { return m_dataX; }
	inline int GetSizeY() const { return m_dataY; }
	inline int GetSizeZ() const { return m_dataZ; }

	bool ReadFromFile(const char * szFileName, unsigned int xVoxels, unsigned int yVoxels, unsigned int zVoxels, size_t voxelsSize);
};

#endif